<div>
	<div style="margin-bottom:15px;overflow: hidden;">
		<button nz-button nzType="primary">全部</button>
		<button nz-button nzType="default">撤回</button>
		<div style="float: right">
			<nz-input-group style="width:220px;" nzSearch [nzAddOnAfter]="suffixButton">
				<input type="text" nz-input placeholder="请输入取药码" />
			</nz-input-group>
			<ng-template #suffixButton>
				<button nz-button nzType="primary" nzSearch>查找</button>
			</ng-template>
		</div>
	</div>
	<nz-table class="medical-table" nzSize="small" #basicTable [nzData]="departmentList" [nzLoading]="tabLoading">
		<thead>
			<tr>
                <th nzWidth="50px" nzLeft="0px"></th>
				<th>下单时间</th>
				<th>患者姓名</th>
				<th>性别</th>
				<th>年龄</th>
				<th>就诊卡号</th>
				<th>处方号</th>
				<th>备注</th>
				<th nzRight="0px">审核状态</th>
			</tr>
		</thead>
		<tbody>
			<tr *ngFor="let data of basicTable.data" [ngClass]="{'selectedRow':selectedRowData.id === data.id}" (click)="selectedRow(data)">
                <td nzLeft="0px" style="background: #fff;"><span class="checkbox" [ngClass]="{active:selectedRowData.id === data.id}"><i nz-icon nzType="check" nzTheme="outline"></i></span></td>
				<td>{{ data.createTime }}</td>
				<td>{{ data.patientName }}</td>
				<td>{{ data.patientGender === "male" ? "男" : data.patientGender === "female" ? "女" : "未知" }}</td>
				<td>{{ data.patientAge }}</td>
				<td>{{ data.cardNo }}</td>
				<td>{{ data.prescId }}</td>
				<td>{{ data.memo }}</td>
				<td nzRight="0px">{{ statusType[data.status] }}</td>
			</tr>
		</tbody>
	</nz-table>
	<div class="pannel" *ngIf="selectedRowData.id">
		<div class="pannel-head">审核结果</div>
		<div class="pannel-body">
			<div nz-row>
				<div nz-col nzSpan="6"><label>审核状态：</label>{{ statusType[selectedRowData.status] }}</div>
				<div nz-col nzSpan="6"><label>审方药师：</label>{{ selectedRowData.auditorName }}</div>
				<div nz-col nzSpan="6"><label>审方时间：</label>{{ selectedRowData.hospitalAuditTime }}</div>
				<div nz-col nzSpan="6"><label>驳回原因：</label>{{ selectedRowData.memo }}</div>
				<div nz-col nzSpan="6"><label>HIS处方号：</label>{{ selectedRowData.prescId }}</div>
				<div nz-col nzSpan="6"><label>审方序号：</label>{{ selectedRowData.id }}</div>
			</div>
		</div>
	</div>
	<div class="pannel" *ngIf="selectedRowData.id">
		<div class="pannel-head">患者信息</div>
		<div class="pannel-body">
			<div nz-row>
				<div nz-col nzSpan="6"><label>患者姓名：</label>{{ selectedRowData.patientName }}</div>
				<div nz-col nzSpan="6"><label>性别：</label>{{ selectedRowData.patientGender }}</div>
				<div nz-col nzSpan="6"><label>年龄：</label>{{ selectedRowData.patientAge }}</div>
				<div nz-col nzSpan="6"><label>就诊卡号：</label>{{ selectedRowData.cardNo }}</div>
				<div nz-col nzSpan="6"><label>开方医生：</label>{{ selectedRowData.doctorName }}</div>
				<div nz-col nzSpan="6"><label>开方时间：</label>{{ selectedRowData.createTime }}</div>
			</div>
		</div>
	</div>
	<div class="pannel" *ngIf="selectedRowData.id">
		<div class="pannel-head">诊断信息</div>
		<div class="pannel-body">
			<div nz-row>
				<div nz-col nzSpan="12"><label>诊断名称：</label>{{ selectedRowData.diagnosisName }}</div>
			</div>
		</div>
	</div>
	<div class="pannel" *ngIf="selectedRowData.id">
		<div class="pannel-head">处方信息</div>
		<div class="pannel-body">
			<nz-table #borderedTable nzBordered [nzShowPagination]="false" [nzData]="medicineList">
				<thead>
					<tr>
						<th>药品名称</th>
						<th>药品规格</th>
						<th>生产厂商</th>
						<th>数量</th>
						<th>剂量</th>
						<th>频次</th>
						<th>使用方式</th>
					</tr>
				</thead>
				<tbody>
					<tr *ngFor="let data of medicineList">
						<td>{{ data.name }}</td>
						<td>{{ data.spec }}</td>
						<td>{{ data.idm }}</td>
						<td>{{ data.quantity }}</td>
						<td>{{ data.dosage }}</td>
						<td>{{ data.frequency }}</td>
						<td>{{ data.instruction }}</td>
					</tr>
				</tbody>
			</nz-table>
		</div>
	</div>
</div>
